package com.hulu73.spring.xml.sax;

import java.io.InputStream;

import javax.xml.parsers.SAXParser;
import javax.xml.parsers.SAXParserFactory;

public class TestSAX {

	public static void main(String[] args) {
		read();  
	}

	private static void read() {
		SAXParserFactory saxParserFactory = null;
		SAXParser parser = null;
		try {
			saxParserFactory = SAXParserFactory.newInstance();
			parser = saxParserFactory.newSAXParser();
			
			InputStream inputStream = TestSAX.class.getClassLoader().getResourceAsStream("test.xml");
			
			parser.parse(inputStream, new MyHandler());
			
			
			
		} catch (Exception e) {
			// TODO: handle exception
		}
	}
	
}
